package com.shenxuchen.crm.service;

import com.shenxuchen.crm.mapper.DeptMapper;
import com.shenxuchen.crm.pojo.Dept;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Resource
    private DeptMapper deptMapper;

    public List<Dept> getAllDept() {
        return deptMapper.getAllDept();
    }

    public Boolean checkNo(String no) {
        return deptMapper.checkNo(no);
    }

    public void save(Dept dept) {
        deptMapper.save(dept);
    }

    public Dept getById(String id) {
        return deptMapper.getById(id);
    }

    public void edit(Dept dept) {
        deptMapper.edit(dept);
    }

    public void delete(String[] ids) {
        deptMapper.delete(ids);
    }

    public List getHasUser(String[] ids) {
        return deptMapper.getHasUser(ids);
    }
}
